/**
 * @description: 添加浏览器前缀
 * @return {*}
 * @Date: 2022-08-13 09:27:13
 */
@mixin utils-user-select($value) {
    -moz-user-select: $value;
    -webkit-user-select: $value;
    -ms-user-select: $value;
}

/**
 * @description: 自适应尺寸 $size  ->  xs(768px) / sm(768px) / md(992px) / lg(1200px) / xl(1400) / xxl(1600px) / xxxl(1800px)
 * @return {*}
 * @Date: 2022-08-23 17:00:56
 */
$mediaSizeList: xs, sm, md, lg, xl, xxl, xxxl;
// @mixin media-sizes {
//     @each $size in $mediaSizeList {
//         @content;
//     }
// }

/**
 * @description: 多媒体查询
 * @return {*}
 * @Date: 2022-08-23 15:57:38
 */
//  利用最小宽度 覆盖
@mixin utils-media-block($size) {
    @if $size == xs {
        @media (max-width: 767px) {
            @content;
        }
    } @else if $size == sm {
        @media (min-width: 768px) {
            @content;
        }
    } @else if $size == md {
        @media (min-width: 992px) {
            @content;
        }
    } @else if $size == lg {
        @media (min-width: 1200px) {
            @content;
        }
    } @else if $size == xl {
        @media (min-width: 1400px) {
            @content;
        }
    } @else if $size == xxl {
        @media (min-width: 1600px) {
            @content;
        }
    } @else if $size == xxxl {
        @media (min-width: 1800px) {
            @content;
        }
    }
}
// 使用最大值和最小值
@mixin utils-media-inblock($size) {
    @if $size == xs {
        @media (max-width: 767px) {
            @content;
        }
    } @else if $size == sm {
        @media (min-width: 768px) and (max-width: 991px) {
            @content;
        }
    } @else if $size == md {
        @media (min-width: 992px) and (max-width: 1199px) {
            @content;
        }
    } @else if $size == lg {
        @media (min-width: 1200px) and (max-width: 1399px) {
            @content;
        }
    } @else if $size == xl {
        @media (min-width: 1400px) and (max-width: 1599px) {
            @content;
        }
    } @else if $size == xxl {
        @media (min-width: 1600px) and (max-width: 1799px) {
            @content;
        }
    } @else if $size == xxxl {
        @media (min-width: 1800px) {
            @content;
        }
    }
}

/**
 * @description: 水平垂直居中对齐（注：父级元素必需定位）
 * @Date: 2022-04-11 16:45:20
 */
@mixin centeredXY() {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/**
 * @description: 垂直居中对齐
 * @Date: 2022-04-11 16:45:08
 */
@mixin centeredY() {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/**
 * @description: 水平居中对齐
 * @Date: 2022-04-11 16:44:58
 */
@mixin centeredX() {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/**
 * @description: 清除浮动影响
 * @Date: 2022-03-17 16:01:28
 */
@mixin clearfix() {
    zoom: 1; /* IE/7/6 */

    &::after {
        content: ' ';
        display: block;
        visibility: hidden;
        height: 0;
        font-size: 0;
        clear: both;
    }
}

/**
 * @description: 多行文本超出省略(IE 浏览器有兼容问题，可设置高为行高的2倍)
 * @Date: 2022-03-17 16:02:04
 */
@mixin ellipsis-row($lineNum: 2) {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: $lineNum;
    line-clamp: $lineNum;
    -webkit-box-orient: vertical;
}
